home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / hf^k-5.dms / in.adf / Fastlib.Lha / Include / stormamiga.h next >
Encoding:
C/C++ Source or Header  |  1996-12-14  |  7.7 KB  |  295 lines

  1. #ifndef  STORMAMIGA_H
  2. #define  STORMAMIGA_H
  3.  
  4. /*
  5. **   $VER: stormamiga.h 42.04 (12.12.1996)
  6. **
  7. **       Copyright © 1996 by COMPIUTECK
  8. **         written by Matthias Henze
  9. **            All Rights Reserved
  10. */
  11.  
  12. #ifndef  _INCLUDE_STDIO_H
  13. #include <stdio.h>
  14. #endif
  15.  
  16. #ifndef _INCLUDE_TIME_H
  17. #include <time.h>
  18. #endif
  19.  
  20. #ifndef INTUITION_INTUITION_H
  21. #include <intuition/intuition.h>
  22. #endif
  23.  
  24. #ifndef GRAPHICS_RASTPORT_H
  25. #include <graphics/rastport.h>
  26. #endif
  27.  
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31.  
  32.  
  33. #define lint          long int
  34. #define llint         long long int
  35. #define uint          unsigned int
  36. #define ulint         unsigned long int
  37. #define ullint        unsigned long long int
  38. #define llong         long long
  39. #define ulong         unsigned long
  40. #define ullong        unsigned long long
  41.  
  42.  
  43. /*----- Nonstandard-AmigaLib-functions -----*/
  44.  
  45. long    SPRINTF       (char *, const char *, ...);
  46. long    VSPRINTF      (char *, const char *, va_list);
  47.  
  48.  
  49. /*----- Nonstandard-stdio-functions -----*/
  50.  
  51. int     printf_       (const char *, ...);
  52. int     fprintf_      (FILE *, const char *, ...);
  53. int     sprintf_      (char *, const char *, ...);
  54.  
  55. int     vprintf_      (const char *, va_list);
  56. int     vfprintf_     (FILE *, const char *, va_list);
  57. int     vsprintf_     (char *, const char *, va_list);
  58.  
  59.  
  60. int     scanf_        (const char *, ...);
  61. int     fscanf_       (FILE *, const char *, ...);
  62. int     sscanf_       (const char *, const char *, ...);
  63. int     dsscanf       (const char *, const char *, ...);
  64.  
  65. int     vscanf        (const char *, va_list);
  66. int     vscanf_       (const char *, va_list);
  67. int     vfscanf       (FILE *, const char *, va_list);
  68. int     vfscanf_      (FILE *, const char *, va_list);
  69. int     vsscanf       (const char *, const char *, va_list);
  70. int     vsscanf_      (const char *, const char *, va_list);
  71.  
  72.  
  73. /* only for compatibility to "stormamiga.lib" V.41.023 - V.41.035 */
  74.  
  75. #define printf__      printf_
  76. #define fprintf__     fprintf_
  77. #define sprintf__     sprintf_
  78. #define vprintf__     vprintf_
  79. #define vfprintf__    vfprintf_
  80. #define vsprintf__    vsprintf_
  81.  
  82. #define scanf__       scanf_
  83. #define fscanf__      fscanf_
  84. #define sscanf__      sscanf_
  85. #define vscanf__      vscanf_
  86. #define vfscanf__     vfscanf_
  87. #define vsscanf__     vsscanf_
  88.  
  89.  
  90. /*----- GCC-Nonstandard-stdio-functions -----*/
  91.  
  92. void    setbuffer     (FILE *, char *, int);
  93. int     setlinebuf    (FILE *);
  94.  
  95.  
  96. /*----- string-functions -----*/
  97.  
  98. int     strcoll       (const char *, const char *);
  99. size_t  strxfrm       (char *, const char *, size_t);
  100.  
  101.  
  102. /*----- Nonstandard-string-functions -----*/
  103.  
  104. #ifdef STORMAMIGA_DEUTSCH
  105.  
  106. #define stricmp       stricmp_d
  107. #define strnicmp      strnicmp_d
  108. #define strcasecmp    strcasecmp_d
  109. #define strncasecmp   strncasecmp_d
  110. #define strlwr        strlwr_d
  111. #define strupr        strupr_d
  112. #define strlower      strlower_d
  113. #define strupper      strupper_d
  114. #endif
  115.  
  116. int     strnicmp      (const char *, const char *, size_t);
  117. int     stricmp_d     (const char *, const char *);
  118. int     strnicmp_d    (const char *, const char *, size_t);
  119. int     strcasecmp_d  (const char *, const char *);
  120. int     strncasecmp_d (const char *, const char *, size_t);
  121. char    *strlwr_d     (char *);
  122. char    *strupr_d     (char *);
  123. char    *strlower_d   (char *);
  124. char    *strupper_d   (char *);
  125.  
  126.  
  127. /*----- GCC-Nonstandard-string-functions -----*/
  128.  
  129. int     bcmp          (const void *, const void *, size_t);
  130. void    bcopy         (const void *, void *, size_t);
  131. int     ffs           (int);
  132. char    *index        (const char *, int);
  133. char    *rindex       (const char *, int);
  134. void    *memccpy      (void *, const void *, int, size_t);
  135. char    *strdup       (const char *);
  136. char    *strsep       (char **, const char *);
  137. void    swab          (const void *, void *, size_t);
  138. int     strcasecmp    (const char *, const char *);
  139. int     strncasecmp   (const char *, const char *, size_t);
  140. char    *strlower     (char *);
  141. char    *strupper     (char *);
  142.  
  143.  
  144. /*----- Nonstandard-assert-functions -----*/
  145.  
  146. #ifdef  NDEBUG
  147. #define assert_(C)
  148.  
  149. #else
  150. void    do_assert_    (char *, char *, char *, unsigned int);
  151. #define assert_(C)    { if(!(C)) do_assert_(#C, __FILE__, __FUNC__, __LINE__); }
  152. #endif
  153.  
  154.  
  155. /*----- Nonstandard-ctype-functions -----*/
  156.  
  157. #ifdef STORMAMIGA_DEUTSCH
  158.  
  159. #define isalnum       isalnum_d
  160. #define isalpha       isalpha_d
  161. #define islower       islower_d
  162. #define isupper       isupper_d
  163. #define tolower       tolower_d
  164. #define toupper       toupper_d
  165. #endif
  166.  
  167. int     isalnum_d     (int);
  168. int     isalpha_d     (int);
  169. int     islower_d     (int);
  170. int     isupper_d     (int);
  171. int     tolower_d     (int);
  172. int     toupper_d     (int);
  173.  
  174.  
  175. /*----- Nonstandard-time-functions -----*/
  176.  
  177. #ifdef STORMAMIGA_DEUTSCH
  178.  
  179. #define strftime      strftime_d
  180. #define asctime       asctime_d
  181. #define ctime         ctime_d
  182. #endif
  183.  
  184. int     strftime_d    (char *, unsigned int, const char *, const struct tm *);
  185. char    *asctime_d    (const struct tm *);
  186. char    *ctime_d      (const time_t *);
  187.  
  188.  
  189. /*----- Nonstandard-math-functions -----*/
  190.  
  191. int     isinf         (double);
  192. int     isnan         (double);
  193.  
  194.  
  195. /*----- Amiga-functions -----*/
  196.  
  197. #ifdef STORMAMIGA_REGISTER
  198.  
  199. #define Move          Move_r
  200. #define GetAPen       GetAPen_r
  201. #define GetBPen       GetBPen_r
  202. #endif
  203.  
  204. void    Move_r        (register __a1 struct RastPort *, register __d0 long, register __d1 long);
  205. ulong   GetAPen_r     (register __a0 struct RastPort *);
  206. ulong   GetBPen_r     (register __a0 struct RastPort *);
  207.  
  208.  
  209. /*----- Special-functions -----*/
  210.  
  211. #ifdef STORMAMIGA_REGISTER
  212.  
  213. #define muls          muls_r
  214. #define mulu          mulu_r
  215. #define divsl         divsl_r
  216. #define divul         divul_r
  217. #define muls64        muls64_r
  218. #define mulu64        mulu64_r
  219. #define divs64        divs64_r
  220. #define divu64        divu64_r
  221. #define button        button_r
  222. #define waitbutton    waitbutton_r
  223. #define max_Width     max_Width_r
  224. #define max_Height    max_Height_r
  225. #else
  226.  
  227. long    muls          (long, long);
  228. ulong   mulu          (ulong, ulong);
  229. long    divsl         (long, long);
  230. ulong   divul         (ulong, ulong);
  231. long    muls64        (long, long);
  232. ulong   mulu64        (ulong, ulong);
  233. long    divs64        (long, long);
  234. ulong   divu64        (ulong, ulong);
  235. int     button        (int, int);
  236. void    waitbutton    (int, int);
  237. int     max_Width     (struct  Window  *);
  238. int     max_Height    (struct Window *);
  239. #endif
  240.  
  241. long    muls_r        (register __d0 long, register __d1 long);
  242. ulong   mulu_r        (register __d0 ulong, register __d1 ulong);
  243. long    divsl_r       (register __d0 long, register __d1 long);
  244. ulong   divul_r       (register __d0 ulong, register __d1 ulong);
  245. long    muls64_r      (register __d0 long, register __d1 long);
  246. ulong   mulu64_r      (register __d0 ulong, register __d1 ulong);
  247. long    divs64_r      (register __d0 long, register __d1 long);
  248. ulong   divu64_r      (register __d0 ulong, register __d1 ulong);
  249. int     button_r      (register __d0 int, register __d1 int);
  250. void    waitbutton_r  (register __d0 int, register __d1 int);
  251. int     max_Width_r   (register __a0 struct Window  *);
  252. int     max_Height_r  (register __a0 struct Window *);
  253.  
  254. int     button_al     ();
  255. int     button_ar     ();
  256. int     button_bl     ();
  257. int     button_br     ();
  258. void    waitbutton_al ();
  259. void    waitbutton_ar ();
  260. void    waitbutton_bl ();
  261. void    waitbutton_br ();
  262.  
  263.  
  264. /*----- Alpha-functions -----*/
  265.  
  266. #ifdef STORMAMIGA_ALPHA
  267.  
  268. #ifdef STORMAMIGA_REGISTER
  269.  
  270. #define SetAPen SetAPen_r
  271. #define SetBPen SetBPen_r
  272. #endif
  273.  
  274. void    SetAPen_r     (register __a1 struct RastPort *, register __d0 ulong);
  275. void    SetBPen_r     (register __a1 struct RastPort *, register __d0 ulong);
  276.  
  277. #endif
  278.  
  279.  
  280. /*----- Inline-functions -----*/
  281.  
  282. #ifdef STORMAMIGA_INLINE
  283.  
  284. #ifndef  STORMAMIGAINLINE_H
  285. #include <stormamigainline.h>
  286. #endif
  287.  
  288. #endif
  289.  
  290. #ifdef __cplusplus
  291. }
  292. #endif
  293.  
  294. #endif   /* STORMAMIGA_H */
  295.